# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=bgrep
pkgver=27.38b746f
pkgrel=1
pkgdesc='Binary grep.'
groups=('blackarch' 'blackarch-binary')
arch=('x86_64' 'aarch64')
url='https://github.com/tmbinc/bgrep'
license=('BSD')
makedepends=('git')
source=("git+https://github.com/tmbinc/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
	cd $pkgname

	make
}

package() {
  cd $pkgname

	install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 README "$pkgdir/usr/share/doc/$pkgname/README"
}

